<?php
namespace app\admin\model;

use think\Model;

class Prices extends Model
{
   public function typeList(){
   	  $types = [
   	  	1=>lang('Domestic DCI'),
   	  	2=>lang('China and Hong Kong cross-border'),
   	  	3=>lang('Overseas DCI'),
   	  	4=>lang('Domestic CCI (non-AWS) - Local access'),
   	  	5=>lang('Domestic CCI (non-AWS) - Intercity access'),
   	  	6=>lang('Domestic CCI (AWS) - Local Access'),
   	  	7=>lang('Domestic CCI (AWS) - Inter-city access'),
   	  	8=>lang('Overseas CCI(Hong Kong)'),
         9=>lang('Overseas CCI')
   	  ];
   	  return $types;
   }
   public function mbpsList(){
   	  return [
      	  	10=>'1M-10M',
      	  	20=>'10M-20M',
      	  	50=>'20M-50M',
      	  	100=>'50M-100M',
      	  	200=>'100M-200M',
      	  	500=>'200M-500M',
      	  	1000=>'500M-1G',
   	  ];
   }
   /*采集对象*/
   public static function getPriceModel(){
      return [
         'megaport' => array('lebal'=>'Megaport'),
      ];
   }
   public function getTypelabelAttr($value){
   	 $types = $this->typeList();
   	 return $types[$value];
   }
   public function getMbpsAttr($value){
	 $mbps = $this->mbpsList();
   	 return $mbps[$value];
   }
}